<template>
    <div class="remond">
        <router-link 
            to="/"
            class="items"
            v-for="(item,index) in ListData" :key="index"
        >
            <div class="divs">
                <span class="span1">{{item.id+1}}</span>
                <img :src="item.img" alt="">
                <span class="span2">{{item.title}}</span>
                <span class="span3">{{item.number}}</span>
            </div> 
        </router-link>
        <div class="zhanwei"></div>
    </div>
</template>
<script>
export default {
    name:'List',
    data(){
        return{
            ListData:[]
        }
    },
    mounted(){
        this.$axios.get(this.List_2_HOST)
        .then(res=>{
            console.log(res.data)
            this.ListData=res.data;
        })
        .catch(error=>{
            console.log(error)
        })
    }
}
</script>
<style lang="less" scoped>
.remond{
    width: 100%;
    .divs{
        width: 100%;
        height: 50px;
        line-height: 50px;
        margin-bottom: 10px;
        .span1{
            font-size: 20px;
            font-weight: 700;
            color:#171818;
            margin-right: 10px;
        }
        img{
            width: 50px;
            height: 50px;
            border-radius: 50%;
            position: relative;
            top:-3px;
            margin-right: 10px;
        }
        .span2{
            color:#171818;
            font-size: 16px;
            font-weight: 500;
        }
        .span3{
            float: right;
            color:#171818;
            font-size: 16px;
            font-weight: 500;
        }
    }
    .zhanwei{
        width: 100%;
        height: 45px;
    }  
}   
</style>